# 配置文件
import os

# API密钥配置
# 星河大模型 API 配置
XINGHE_API_KEY = "d57547e76c059890105467b88cbd18ddd6a07b8d"
XINGHE_BASE_URL = "https://aistudio.baidu.com/llm/lmapi/v3"
OPENAI_API_KEY = "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"
DEEPSEEK_API_KEY = "sk-2a6c358823254f5fb6e483da4c4c86d7"
# Gemini API Key
GEMINI_API_KEY = "AIzaSyB1lMryiHH_V_7-OVT4eyuLBrHbLsigRCs"



# 模型配置
OPENAI_MODEL = "gpt-3.5-turbo"
DEEPSEEK_MODEL = "deepseek-chat"
XINGHE_MODEL = "ernie-4.5-turbo-vl"  # 星河大模型名称

# 应用配置
FLASK_SECRET_KEY = 'your-secret-key-here'
DEBUG_MODE = True

# 默认用户配置
DEFAULT_USERS = {
    'admin': {'password': '123456', 'role': 'admin', 'name': '管理员'},
    'student': {'password': '123456', 'role': 'student', 'name': '学生'},
    'teacher': {'password': '123456', 'role': 'teacher', 'name': '教师'}
}

# 知识库配置
KNOWLEDGE_BASE_PATH = 'rust_knowledge_base/rust_docs_sample.json'

# 问题分类标签
QUESTION_LABELS = ["greeting", "definition", "usage", "error_debug", "comparison", "faq"]

# 从环境变量读取API密钥（如果存在）
if os.getenv('OPENAI_API_KEY'):
    OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')

if os.getenv('DEEPSEEK_API_KEY'):
    DEEPSEEK_API_KEY = os.getenv('DEEPSEEK_API_KEY')

if os.getenv('GEMINI_API_KEY'):
    GEMINI_API_KEY = os.getenv('GEMINI_API_KEY')

if os.getenv('XINGHE_API_KEY'):
    XINGHE_API_KEY = os.getenv('XINGHE_API_KEY') 